﻿/// <summary>
/// 封装组件的数据源
/// </summary>
/// <remarks></remarks>

namespace Marmat.Forms
{
    public interface IBindingSource
    {

        /// <summary>
        /// 获取列集合
        /// </summary>
        /// <returns></returns>
        BindingFieldInfo[] GetColumnCollection();

        /// <summary>
        /// 获取编辑控件实际绑定的数据源。
        /// </summary>
        /// <returns></returns>
        /// <remarks></remarks>
        object GetDataSource();

        /// <summary>
        /// 获取或设置当前数据是否允许编辑。
        /// </summary>
        /// <returns></returns>
        bool AllowEdit { get; set; }
    }
}